while True:
    try:
        n,k = map(int,input().split())
        a = list(map(int, input().split()))
        if n == 0:
            print(0)
        m = a.index(0)
        i = m+1
        while i < n and a[i]>k:
            i = i+1
        j = m-1
        while j>=0 and a[j]>k:
            j = j-1
        if m<i<n and 0<=j < m:
            #if abs(i-m) == abs(j-m):
             #   print(i+1 if a[i]<a[j] else j+1)
            #else:
            print(i+1 if abs(i-m)<abs(j-m) else j+1)
        else:
            print(i+1 if m<i<n else j+1)
    except:
        break